package com.xieyingwangluo.yxpart.bean;

import com.xieyingwangluo.yxpart.entity.WorksheetModel;
import com.xieyingwangluo.yxpart.utils.DateUtil;
import lombok.Data;

@Data
public class WorksheetBean {
    private String noid;//工作表编号UUID
    private String part_id;//关联的兼职编号UUID
    private String userinfo_id;//关联的用户编号UUID
    private String enroll_id;//关联的报名编号UUID
    private String record_time;//录用时间
    private Integer state;//工作状态
    private Integer completion;//工作完成度
    private Integer payamount;//付款金额
    private Integer time;//工作时长
    private String makespan;//完工时间

    public WorksheetBean(WorksheetModel worksheetModel){
        noid = worksheetModel.getNoid();
        part_id = worksheetModel.getPart_id();
        userinfo_id = worksheetModel.getUserinfo_id();
        enroll_id = worksheetModel.getEnroll_id();
        record_time = DateUtil.DtS(worksheetModel.getRecord_time(),"yyyy-MM-dd");
        state = worksheetModel.getState();
        completion = worksheetModel.getCompletion();
        payamount = worksheetModel.getPayamount();
        time = worksheetModel.getTime();
        makespan = DateUtil.DtS(worksheetModel.getMakespan(),"yyyy-MM-dd");
    }
}
